package movee.spring.app.template.domain.api;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 一般情况下的响应
 *
 * @author movee
 */
@Data
@NoArgsConstructor
public class NormalResponse<T> extends ApiResponse {

    private ResponseData<T> data;

    public NormalResponse(final T data) {
        super(ApiStatusCode.OK.getCode(), "success");
        this.data = new ResponseData<>(data);
    }

    public NormalResponse(final String message, final T data) {
        super(ApiStatusCode.OK.getCode(), message);
        this.data = new ResponseData<>(data);
    }
}
